<!-- toaster directive -->
<toaster-container
        toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
<!-- / toaster directive -->
<!-- 导航条 -->
<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
        <li><a ui-sref="main"><i class="glyphicon glyphicon-user"></i> 人员管理</a></li>
        <li><a ui-sref="main.member.list" class="active">人员信息</a></li>
    </ul>
</div>

<!-- 加载提醒 -->
<div ng-show="loading" class="text-center m-t-md text-lg dataWarn"><i class="fa fa-spin fa-spinner"></i> 数据加载中...</div>

<!-- 内容区域 -->
<div ng-hide="loading" class="wrapper-md content"> <!-- ng-hide="loading" -->
    <!-- 数据显示 -->
    <div class="wrapper-data">
        <div class="panel panel-default">
            <!-- 头部 -->
            <div class="panel-heading clearfix">

                <div class="w-auto">
                    <form class="form-inline"> <!-- ng-submit="search()" -->

                        <div class="form-group">
                            <label for="name">姓名：</label>
                            <input type="text" class="form-control" ng-model="param.personName" style="width: 180px"
                                   id="name" placeholder="请输入姓名">
                        </div>
                        <div class="form-group">
                            <label for="IDCardNo">身份证号：</label>
                            <input type="text" class="form-control" ng-model="param.IDCardNo" style="width: 180px"
                                   id="IDCardNo"
                                   placeholder="请输入身份证号">
                        </div>
                        <div class="form-group">
                            <label for="mobileNo">手机号码：</label>
                            <input type="text" class="form-control" ng-model="param.mobileNo" style="width: 180px"
                                   id="mobileNo"
                                   placeholder="手机号码">
                        </div>
                      <!--   <div class="form-group">
                            <label for="address">地址：</label>
                            <input type="text" class="form-control" ng-model="param.address" style="width: 180px"
                                   id="address" placeholder="请输入地址">
                        </div> -->
                        <div class="form-group">
                            <button type="submit" class="btn btn-primary new-primary" style="margin-left: 10px"
                                    ng-click="clearSearch()" ng-show="read">查询
                            </button>
                        </div>
                        <a ui-sref="main.member.create" class="btn btn-info"
                           style="margin-top: 4px;background-color: #fb7009!important;color: #fff;border: 1px solid #fb7009;"
                           ng-show="add">
                            <i class="icon-user-follow m-r-sm text-md"></i>添加人员
                        </a>
                        <div class="form-group">
                        <button ng-click="delAll()" type="button" class="btn btn-primary delAll"
                                        style="margin-left: 0px" ng-show="dele">批量删除
                        </button>
                        </div>
                    </form>


                </div>
            </div>

            <!-- 数据表格 -->
            <div class="table-responsive">
                <table class="table table-striped b-t b-light text-center">
                    <thead>
                    <tr>
                        <th><input name="allCheck" type="checkbox" value="" id="allCheck" ng-click="allCheck($event,data)"/>全选</th>
                        <th>姓名</th>
                        <th>性别</th>
                        <th>手机号码</th>
                        <th>身份证</th>
                        <!-- <th>地址</th> -->
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody class="tbody">
                    <tr ng-repeat="item in pageInfo.data">
                        <td class="v-middle"><input name="Fruit" type="checkbox" id="{{item.personId}}" value="{{item.personId}}" ng-click="checkStatus()" /></td>
                        <td class="v-middle">{{item.personName}}</td>
                        <td class="v-middle">
                            <span ng-show="item.sex==1" class="text-success">男</span>
                            <span ng-show="item.sex==2" class="text-success">女</span>
                        </td>
                        <td class="v-middle">{{item.mobileNo}}</td>
                        <td class="v-middle">{{item.IDCardNo}}</td>
                       <!--  <td class="v-middle">{{item.address}}</td> -->
                        <td class="v-middle">
                            <a ui-sref="main.member.details({id: item.personId})" ng-show="read">
                                <!--<i class="fa fa-edit m-r-xs text-sm"></i>-->
                                详情
                            </a>
                            <!--class="btn btn-sm btn-primary"-->
                            <a ui-sref="main.member.update({id: item.personId})" ng-show="update">
                                <!--<i class="fa fa-edit m-r-xs text-sm"></i>-->
                                编辑
                            </a>
                            <!--class="btn btn-sm btn-primary"-->

                            <!--class="btn btn-sm btn-danger m-l-xs"-->
                            <!--<i class="fa fa-ban m-r-xs text-sm"></i>-->
                            <button ng-click="delItem(item.personId)" type="button"
                                    style="border:none;color:#fb7009;border-radius:4px;background: none;"
                                    ng-show="dele" ng-show="dele">
                                删除
                            </button>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <!-- /.table-responsive -->

            <!-- 底部分页 -->
            <span data-ng-include=" 'src/tpl/pageInfo.html' "></span>
        </div>
        <!-- /.panel -->
    </div>
    <!-- /.wrapper-data -->

</div>
<!-- /.wrapper-md -->

<style scoped>
.delAll {
    line-height: 35.5px;
    padding: 0 10px;
    background-color: #FF0000;
    border-radius: 4px;
    color: #FF0000;
    border: none;
    vertical-align: middle;
}

</style>